//
//  ConsumerTVCell.m
//  Travel assistant
//
//  Created by lanou3g on 16/2/28.
//  Copyright © 2016年 旅游助手. All rights reserved.
//

#import "ConsumerTVCell.h"

@interface ConsumerTVCell ()
@property (strong, nonatomic) IBOutlet UIImageView *typeImV;
@property (strong, nonatomic) IBOutlet UILabel *typeLable;
@property (strong, nonatomic) IBOutlet UILabel *amountLable;
@property (strong, nonatomic) IBOutlet UILabel *noteLable;
@property (nonatomic, strong) NSArray *consumeArray;

@end
@implementation ConsumerTVCell
- (NSArray *)consumeArray{
    if (!_consumeArray) {
        _consumeArray = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"AddConsume" ofType:@"plist"]];
    }
    return _consumeArray;
}

- (void)awakeFromNib {
    // Initialization code
}
- (void)setConModel:(ConModel *)conModel{
    _conModel = conModel;
    NSInteger row = [self.conModel.consumType integerValue];
    self.typeImV.image = [UIImage imageNamed:self.consumeArray[row][@"imageName"]];
    self.typeLable.text = self.consumeArray[row][@"name"];
    self.amountLable.text = self.conModel.consumAmount;
    self.noteLable.text = self.conModel.consumNote;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
